package com.yanqu.road.entity.rank;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.union.UnionBaseInfo;

import java.math.BigInteger;

public class UnionActivityRank {

    private int activityId;

    private int groupId;                          //活动分组ID

    private int phase;

    private String unionUid;

    private UnionBaseInfo unionBaseInfo = new UnionBaseInfo();

    private BigInteger value;

    private long lastUpdateTime;

    public UnionActivityRank(int activityId, int groupId) {
        this.activityId = activityId;
        this.groupId = groupId;
    }

    public UnionActivityRank() {
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getPhase() {
        return phase;
    }

    public void setPhase(int phase) {
        this.phase = phase;
    }

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        this.unionUid = unionUid;
    }

    public UnionBaseInfo getUnionBaseInfo() {
        return unionBaseInfo;
    }

    public String getUnionBaseInfoJsonStr(){
        if(null == unionBaseInfo){
            return "{}";
        }else {
            return JSON.toJSONString(unionBaseInfo);
        }
    }

    public void setUnionBaseInfo(UnionBaseInfo unionBaseInfo) {
        this.unionBaseInfo = unionBaseInfo;
    }

    public BigInteger getValue() {
        return value;
    }

    public void setValue(BigInteger value) {
        this.value = value;
    }

    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }
}
